package com.zqxq.auth.entity.bo;

import com.zqxq.auth.entity.po.Func;
import com.zqxq.auth.entity.po.UserAdmin;
import lombok.Data;

/**
 * Created by Administrator on 2018/01/10 16:46
 */
@Data
public class UserFuncBO {
    /**
     * 用户ID
     */
    private Long user_id;
    /**
     * 功能主键
     */
    private Long fn_id;
    /**
     * 功能名称
     */
    private String fn_name;
    /**
     * 功能资源符uri;不含域名端口问号参数
     */
    private String fn_uri;
    /**
     * 功能码
     */
    private String fn_code;
    /**
     * 功能权限:0.无登录都可访问,1.登录都可访问,2.登录限制权限访问
     */
    private Integer fn_auth;
    private Integer download_flag;//是否下载标志：0=否，1=是
    private Long menu_id;//菜单id
    private Integer record_log;//记录访问日志：0=不记录，1=记录
    private Integer phone_auth;//手机号查看权限：0=脱敏，1=不脱敏
    private Integer id_no_auth;//身份证查看权限：0=脱敏，1=不脱敏
    private Integer bank_auth;//银行卡查看权限：0=脱敏，1=不脱敏
    public UserFuncBO(){}
    public UserFuncBO(Func func, UserAdmin userAdmin) {
        this.fn_id = func.getFn_id();
        this.fn_name = func.getFn_name();
        this.fn_uri = func.getFn_uri();
        this.fn_code = func.getFn_code();
        this.fn_auth = func.getFn_auth();
        this.menu_id = func.getMenu_id();
        this.record_log = func.getRecord_log();
        this.download_flag = func.getDownload_flag();

        this.phone_auth = userAdmin.getPhone_auth();
        this.id_no_auth = userAdmin.getId_no_auth();
        this.bank_auth = userAdmin.getBank_auth();
    }
    @Override
    public String toString() {
        return "UserFuncBO{" +
                "user_id=" + user_id +
                ", fn_id=" + fn_id +
                ", fn_name='" + fn_name + '\'' +
                ", fn_uri='" + fn_uri + '\'' +
                ", fn_code='" + fn_code + '\'' +
                ", fn_auth=" + fn_auth +
                ", download_flag=" + download_flag +
                ", menu_id=" + menu_id +
                ", record_log=" + record_log +
                ", phone_auth=" + phone_auth +
                ", id_no_auth=" + id_no_auth +
                ", bank_auth=" + bank_auth +
                '}';
    }
}
